/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.io.Serializable;
/**
 * Tabla provincia. Almacena los datos de provincia.
 */
public class Tbv_provincia implements Serializable {
	public Tbv_provincia() {
	}
	
	private java.util.Set this_getSet (int key) {
		if (key == orm.ORMConstants.KEY_TBV_PROVINCIA_TBV_COMUNA) {
			return ORM_tbv_comuna;
		}
		
		return null;
	}
	
	private void this_setOwner(Object owner, int key) {
		if (key == orm.ORMConstants.KEY_TBV_PROVINCIA_TBV_REGIONRE_ID_REGION) {
			this.tbv_regionre_id_region = (orm.Tbv_region) owner;
		}
	}
	
	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}
		
		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}
		
	};
	
	private int pr_id_provincia;
	
	private String pr_provincia;
	
	private orm.Tbv_region tbv_regionre_id_region;
	
	private java.util.Set ORM_tbv_comuna = new java.util.HashSet();
	
	private void setPr_id_provincia(int value) {
		this.pr_id_provincia = value;
	}
	
	public int getPr_id_provincia() {
		return pr_id_provincia;
	}
	
	public int getORMID() {
		return getPr_id_provincia();
	}
	
	/**
	 * Nombre de provincia.
	 */
	public void setPr_provincia(String value) {
		this.pr_provincia = value;
	}
	
	/**
	 * Nombre de provincia.
	 */
	public String getPr_provincia() {
		return pr_provincia;
	}
	
	public void setTbv_regionre_id_region(orm.Tbv_region value) {
		if (tbv_regionre_id_region != null) {
			tbv_regionre_id_region.tbv_provincia.remove(this);
		}
		if (value != null) {
			value.tbv_provincia.add(this);
		}
	}
	
	public orm.Tbv_region getTbv_regionre_id_region() {
		return tbv_regionre_id_region;
	}
	
	/**
	 * This method is for internal use only.
	 */
	public void setORM_Tbv_regionre_id_region(orm.Tbv_region value) {
		this.tbv_regionre_id_region = value;
	}
	
	private orm.Tbv_region getORM_Tbv_regionre_id_region() {
		return tbv_regionre_id_region;
	}
	
	private void setORM_Tbv_comuna(java.util.Set value) {
		this.ORM_tbv_comuna = value;
	}
	
	private java.util.Set getORM_Tbv_comuna() {
		return ORM_tbv_comuna;
	}
	
	public final orm.Tbv_comunaSetCollection tbv_comuna = new orm.Tbv_comunaSetCollection(this, _ormAdapter, orm.ORMConstants.KEY_TBV_PROVINCIA_TBV_COMUNA, orm.ORMConstants.KEY_TBV_COMUNA_TBV_PROVINCIAPR_ID_PROVINCIA, orm.ORMConstants.KEY_MUL_ONE_TO_MANY);
	
	public String toString() {
		return String.valueOf(getPr_id_provincia());
	}
	
}
